package com.bkq.cb;

import java.util.Calendar;

import android.app.Activity;
import android.app.DatePickerDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.*;

public class SelectModeScreen extends Activity {
	private Button back;
	private RadioGroup radio;
	
	private TextView tv;
	
	private String day,idUser,nameUser;
	public void onCreate(Bundle savedInstanceState) {
		 super.onCreate(savedInstanceState);
	     setContentView(R.layout.selectmode);
	     back = (Button)findViewById(R.id.backIma_SelectMode);
	     radio = (RadioGroup)findViewById(R.id.radioGroup);
	    tv = (TextView)findViewById(R.id.tv_SelectMode);
	    Bundle extras = getIntent().getExtras();

        if(extras!=null)
	     {
	    idUser = extras.getString("idUser").toString();
	    nameUser = extras.getString("nameUser").toString();
	     }
	     back.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
			}
		});
	     radio.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
			
			@Override
			public void onCheckedChanged(RadioGroup group, int checkedId) {
				// TODO Auto-generated method stub
				 
				if(checkedId == R.id.day)
				{
					//tv.setText("Khoa");
					Intent i = new Intent(SelectModeScreen.this,DayModeScreen.class);
					i.putExtra("idUser", idUser);
					i.putExtra("nameUser", nameUser);
					startActivity(i);
		    	}
				else if(checkedId == R.id.custom)
				{
					Intent i = new Intent(SelectModeScreen.this,CustomModeScreen.class);
					i.putExtra("idUser", idUser);
					i.putExtra("nameUser", nameUser);
					startActivity(i);
				}
			}
		});
	}
}
